package com.singzi.testCase;

import org.junit.Test;

public class T0043Test {
    public static void main(String[] args) {

        String s1 = "123";
        String s2 = "4";
        System.out.println(s1.length());
//        for (int i=0;i<s1.length();i++){
//            System.out.println(s1.charAt(i));
//            Integer.valueOf("12");
//            int a = s1.charAt(i)-48;
//            System.out.println(a);
//
//
//        }

        int a = s1.length();
        System.out.println(strToInteger(s1, a)*strToInteger(s2,s2.length()));

    }

    public static int strToInteger(String s1,int n){
        int sum=0;
        for (int i=0;i<s1.length();i++){
            int a = s1.charAt(i)-48;
            double s = a*Math.pow(10,n-1);
            s = Math.round(s);
            sum = (int) (sum+s);
            n--;


        }
        return sum;


    }
    @Test
    public void Test01(){
        String s1 = "";
        for(int i=0;i<5;i++){
            s1=s1+'1';
        }
        int a=5;
        int b=6;
        int c=a>b?a:b;
        System.out.println(c);
        System.out.println(s1);

    }
}
class S043{

}

